Telegram Group & Telegram Channel
Совет по Laravel 💡

Вот 3 синтаксических способа определения внешнего ключа отношения belongsTo в миграциях.
Лично я считаю второй вариант более предпочтительным.

Schema:: create( 'orders', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger( 'user_id');
$table->foreign('user_id')->references( id') ->on('users");
});
// Or
Schema: :create( 'orders', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained();
});
/Or
Schema: :create( 'orders', function (Blueprint $table) {
$table->id();
$table->foreignIdFor (User: :class) ->constrained( ) ;
/
});

👉 @php_lib
👍4



tg-me.com/php_lib/499
Create:
Last Update:

Совет по Laravel 💡

Вот 3 синтаксических способа определения внешнего ключа отношения belongsTo в миграциях.
Лично я считаю второй вариант более предпочтительным.

Schema:: create( 'orders', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger( 'user_id');
$table->foreign('user_id')->references( id') ->on('users");
});
// Or
Schema: :create( 'orders', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained();
});
/Or
Schema: :create( 'orders', function (Blueprint $table) {
$table->id();
$table->foreignIdFor (User: :class) ->constrained( ) ;
/
});

👉 @php_lib

BY Библиотека PHP программиста 👨🏼‍💻👩‍💻




Share with your friend now:
tg-me.com/php_lib/499

View MORE
Open in Telegram


Библиотека PHP программиста ‍‍ Telegram | DID YOU KNOW?

Date: |

Telegram Be The Next Best SPAC

I have no inside knowledge of a potential stock listing of the popular anti-Whatsapp messaging app, Telegram. But I know this much, judging by most people I talk to, especially crypto investors, if Telegram ever went public, people would gobble it up. I know I would. I’m waiting for it. So is Sergei Sergienko, who claims he owns $800,000 of Telegram’s pre-initial coin offering (ICO) tokens. “If Telegram does a SPAC IPO, there would be demand for this issue. It would probably outstrip the interest we saw during the ICO. Why? Because as of right now Telegram looks like a liberal application that can accept anyone - right after WhatsApp and others have turn on the censorship,” he says.

Traders also expressed uncertainty about the situation with China Evergrande, as the indebted property company has not provided clarification about a key interest payment.In economic news, the Commerce Department reported an unexpected increase in U.S. new home sales in August.Crude oil prices climbed Friday and front-month WTI oil futures contracts saw gains for a fifth straight week amid tighter supplies. West Texas Intermediate Crude oil futures for November rose $0.68 or 0.9 percent at 73.98 a barrel. WTI Crude futures gained 2.8 percent for the week.

Библиотека PHP программиста ‍‍ from sg


Telegram Библиотека PHP программиста 👨🏼‍💻👩‍💻
FROM USA